home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / rawstat / RCS / printFields,v < prev    next >
Encoding:
Text File  |  1989-06-23  |  659 b   |  42 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @# @;
  7.  
  8.  
  9. 1.1
  10. date     89.06.23.15.48.46;  author brent;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @AWK script to help generate the print statements for this program
  17. @
  18.  
  19.  
  20.  
  21. 1.1
  22. log
  23. @Initial revision
  24. @
  25. text
  26. @BEGIN { inTypedef = 0  }
  27. /typedef/ { inTypedef = 1; printf ("\n") }
  28.  
  29. /^}/    { n = split($0, line, ";") ;
  30.       n = split(line[1], token, " ") ;
  31.       printf( "\t%s *X;\n", token[n] ) ;
  32.       inTypedef = 0;
  33.     }
  34.  
  35. /;/    { if (inTypedef) {
  36.         n = split($0, line, ";") ;
  37.             n = split(line[1], token, " ") ;
  38.         printf ( "\tZeroPrint(\"%-14s %%8d\\n\", X->%s);\n", token[n], token[n] )
  39.         }
  40.      }
  41. @
  42.